package com.hxx.widget.richtext

import android.graphics.Color
import android.text.Layout

data class Style(
    var alignment: Layout.Alignment = Layout.Alignment.ALIGN_NORMAL,
    var color: Int = Color.BLACK,
    var fontSizeScale: Float = 1f,
    var bold: Boolean = false,
    var italic: Boolean = false,
    var underline: Boolean = false,
    var strikeThrough: Boolean = false,
//    var indentLevel: Int = 0,
    var isListOrder: Boolean = false,
) {

    /**
     * 相同样式信息对比
     */
    fun compare(other: Style?): Boolean {
        if (other == null) return false
        if (other.bold != bold) return false
        if (other.italic != italic) return false
        if (other.underline != underline) return false
        if (other.strikeThrough != strikeThrough) return false
        if (other.fontSizeScale != fontSizeScale) return false
        if (other.color != color) return false
//        if (other.indentLevel != indentLevel) return false
        return true
    }
}